﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title> 
    <link href="Urls/Customer/css/default.css" rel="stylesheet" />
    <link href="Urls/Customer/css/styles.css" rel="stylesheet" />

    <!--必要样式--> 
</head>
<body>
    <div class='login'>
        <div class='login_title'>
            <span>账号登HAHAHAHA 录</span>
        </div>
        <div class='login_fields'>
            <div class='login_fields__user'>
                <div class='icon'>
                    <img src="Urls/Customer/css/user.png" />
                </div>
                <input placeholder='请输入注册邮箱/证件号' id="txtname" type='text'>
                <div class='validation'>
                    <img src="Urls/Customer/css/tick.png" />
                </div>
                </input>
            </div>
            <div class='login_fields__password'>
                <div class='icon'>
                    <img src="Urls/Customer/css/pwd.png" />
                </div>
                <input placeholder='密码' type='password' id="txtpwd">
                <div class='validation'>
                    <img src="Urls/Customer/css/tick.png" />
                </div>

            </div>
            <span style="margin-left: 30px; color: #5B5E6F" id="sptishi">   </span>
        

            <div class='login_fields__submit'>
                <input type='button' id="denglu" value='登录' onclick="DengLu();">
                <div class='forgot'>
                    <a href='/Urls/ForGetPassWord/yanzheng.html'>忘记密码?</a>
                </div>
            </div>
        </div>
        <div class='success'>
            <h2>认证成功</h2>
            <p>欢迎回来</p>
        </div>
        <div class='disclaimer'>
            <p style=" font-size: 15px;">欢迎登录豪德酒店管理系统</p>
        </div>
    </div>
    <div class='authent'>
        <img src="Urls/Customer/js/tick77.gif" />
        <p>登录中...</p>
    </div>

    <script src="Urls/Customer/js/stopExecutionOnTimeout.js"></script>

    <script src="../../JS/jquery-1.7.2.js"></script>
    <script src="../../JS/MySelf.js"></script>
    <script src="Urls/Customer/js/jquery-ui.min.js"></script>
    <script src="../../layer/layer.js"></script>
    <script>


        $(function () {
            $("#denglu").click(function () {

                $('.login').addClass('test');
                setTimeout(function () {
                    $('.login').addClass('testtwo');
                }, 300);
                setTimeout(function () {
                    $('.authent').show().animate({ right: -320 }, {
                        easing: 'easeOutQuint',
                        duration: 600,
                        queue: false
                    });
                    $('.authent').animate({ opacity: 1 }, {
                        duration: 200,
                        queue: false
                    }).addClass('visible');
                }, 500);
                setTimeout(function () {
                    $('.authent').show().animate({ right: 90 }, {
                        easing: 'easeOutQuint',
                        duration: 600,
                        queue: false
                    });
                    $('.authent').animate({ opacity: 0 }, {
                        duration: 200,
                        queue: false
                    }).addClass('visible');
                    $('.login').removeClass('testtwo');
                }, 2000);
                setTimeout(function () {
                    $('.login').removeClass('test');
                    //   $('.login div').fadeOut(123);
                }, 2000);
                setTimeout(function () {
                    var txtname = $("#txtname").val();
                    var txtpwd = $("#txtpwd").val();
                    if (txtname != null && txtname != "") {
                        if (txtpwd != null && txtpwd != "") {
                            var ps = new FormData();
                            ps.append("txtname", txtname);
                            ps.append("txtpwd", txtpwd);
                            ps.append("action", "login");
                            var data = MyMethod.AjaxSubmitInfo(ps, "/controller/yanzheng.ashx");
                            
                            if (data != null && data != "" && data == "1") {
                                $("#sptishi").text("登录成功 ！");
                                window.location.href = "/Urls/Main/ShouYe.aspx";
                            }
                            else if (data != null && data != "" && data == "2") {
                                $('.login_fields').fadeIn();
                                layer.open({
                                    type: 2,
                                    title: '',
                                    shadeClose: false,   //  点击空白处关闭
                                    shade: 0.8,
                                    area: ['15%', '8%'],
                                    content: ["/Urls/Customer/tishi.html?id=2"]
                                   , scrolling: 'no'
                                   , end: function () {
                                       location.reload();  //  结束时刷新页面
                                   }
                                });
                            }
                            else if (data != null && data != "" && data == "10") {
                                $('.login_fields').fadeIn();
                                layer.open({
                                    type: 2,
                                    title: '',
                                    shadeClose: false,   //  点击空白处关闭
                                    shade: 0.8,
                                    area: ['15%', '8%'],
                                    content: ["/Urls/Customer/tishi.html?id=10"]
                                   , scrolling: 'no'
                                   , end: function () {
                                       location.reload();  //  结束时刷新页面
                                   }
                                });
                            }
                            else if (data != null && data != "" && data == "0") {

                                // window.location.reload();
                                $('.login_fields').fadeIn();

                                layer.open({
                                    type: 2,
                                    title: '',
                                    shadeClose: false,   //  点击空白处关闭
                                    shade: 0.8,
                                    area: ['15%', '8%'],
                                    content: ["/Urls/Customer/tishi.html?id=0"]
                                 , scrolling: 'no'
                                 , end: function () {
                                     location.reload();  //  结束时刷新页面
                                 }
                                });
                            }
                        }
                        else if (data != null && data != "" && data == "3") {
                            $('.login_fields').fadeIn();

                            layer.open({
                                type: 2,
                                title: '',
                                shadeClose: false,   //  点击空白处关闭
                                shade: 0.8,
                                area: ['15%', '8%'],
                                content: ["/Urls/Customer/tishi.html?id=3"]
                             , scrolling: 'no'
                             , end: function () {
                                 location.reload();  //  结束时刷新页面
                             }
                            });
                        }
                    }
                    else if (data != null && data != "" && data == "4") {
                        $('.login_fields').fadeIn();

                        layer.open({
                            type: 2,
                            title: '',
                            shadeClose: false,   //  点击空白处关闭
                            shade: 0.8,
                            area: ['15%', '8%'],
                            content: ["/Urls/Customer/tishi.html?id=4"]
                         , scrolling: 'no'
                         , end: function () {
                             location.reload();  //  结束时刷新页面
                         }
                        });
                    }

                }, 2000);
            });
        });

        $('input[type="text"],input[type="password"]').focus(function () {
            $(this).prev().animate({ 'opacity': '1' }, 2002);
        });
        $('input[type="text"],input[type="password"]').blur(function () {
            $(this).prev().animate({ 'opacity': '.5' }, 2002);
        });
        $('input[type="text"],input[type="password"]').keyup(function () {
            if (!$(this).val() == '') {    //  不为空
                $(this).next().animate({
                    'opacity': '1',
                    'right': '30'
                }, 2002);
            } else {         //  为空
                $(this).next().animate({
                    'opacity': '0',
                    'left': '20'
                }, 2002);
            }
        });




    </script>

</body>
</html>
